package com.xored.searchwt;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;

/**
 * Represents the search view
 * 
 * @author Yuri Strot
 */
public interface ISearchView {
	
	/**
	 * Ignore given workbench part as a find/replace target part
	 * 
	 * @param part workbench part which can be ignored
	 * @return true, if the given part should be ignored and false, otherwise
	 */
	public boolean ignore(IWorkbenchPart part);
	
	/**
	 * Update search view with the given information
	 * 
	 * @param enable true, if the search view should be enabled
	 * @param highlight true, if the highlighting available 
	 * @param text initially selected text in the find/replace target 
	 */
	public void update(IWorkbenchPart part, boolean highlight, String text);
	
	public void updateHighlightCount(int count);	
	
	public void backFocus();
	
	/**
	 * @param text
	 */
	public void initTextLayout(Composite parent, Control text);
	
	public void initLabelLayout(Composite parent, Control label);
	
	/**
	 * @return
	 */
	public IWorkbenchWindow getWindow();
	
	/**
	 * @return
	 */
	public Shell getShell();

}
